package structure.adapter;

public interface MediaPlayer {
    void play(String audioType, String fileName);
}

class MediaPlayer implements Player {

    @Override
    public void play(String type, String name) {
        switch (type) {
            case "mp4":
                Adapter mediaAdapter = new Adapter("mp4");
                mediaAdapter.play(type, name);
                break;
            case "mp3":
                mediaAdapter = new Adapter("mp3");
                mediaAdapter.play(type, name);
                break;
        }
    }
}
